//
//  DiscoveryTableViewCell.m
//  EasyChat
//
//  Created by romana on 16/6/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "DiscoveryTableViewCell.h"

@implementation DiscoveryTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;

}


-(void)createView{

    self.leftImageV = [[UIImageView alloc] init];
    self.leftImageV.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.leftImageV];
    [_leftImageV release];
    
    self.midLabel = [[UILabel alloc] init];
    self.midLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.midLabel];
    [_midLabel release];
    
    self.rightImageV = [[UIImageView alloc] init];
    self.rightImageV.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.rightImageV];
    [_rightImageV release];
    
    self.gapView = [[UIView alloc] init];
    self.gapView.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:self.gapView];
    [_gapView release];
    
    


}

-(void)layoutSubviews{

    self.leftImageV.frame = CGRectMake(10, 10, 30, 30);
    self.midLabel.frame = CGRectMake(60, 0, self.contentView.frame.size.width - 100, self.contentView.frame.size.height);
    self.rightImageV.frame = CGRectMake(self.contentView.frame.size.width - 30, 15, 20, 20);
    
    self.gapView.frame = CGRectMake(0, self.contentView.frame.size.height - 1, self.contentView.frame.size.width, 1);


}


@end
